package com.dokimall.cart.service;

import com.dokimall.cart.vo.Cart;
import com.dokimall.cart.vo.CartItem;
import com.dokimall.cart.vo.UserInfo;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @ClassName: CartService
 * @Description:
 * @Author
 * @Date 2021/10/24
 * @Version 1.0
 */

public interface CartService {
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    CartItem getCartById(Long skuId);

    Cart getCart(UserInfo userInfo) throws ExecutionException, InterruptedException;

    void clearCart(String userKey);

    void checkItem(Long skuId, Integer check);

    void changeItemNum(Long skuId, Integer num);

    void deleteItem(Long skuId);

    List<CartItem> getCheckedItem();
}
